<?php require_once('./modulos/header.php'); ?>
<?php require_once('./BD/Automovil/automovil_extraer.php'); ?>

           
    <body>
        <!--[if lt IE 7]>
            <p class="chromeframe">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to improve your experience.</p>
        <![endif]-->
        
      
        
        
<?php  require_once('./modulos/navbar.php'); ?>         

    <!-- Main jumbotron for a primary marketing message or call to action -->
    <div class="jumbotron">
      <div class="container">
        <h1>Lista de Automoviles</h1>
        <p>Toda la variedad de Automoviles que se encuentran disponibles.</p>
      </div>
    </div>

    
    
          
    <div class="container">
      <!-- Example row of columns -->
      <div class="row">
          
          
        <div class="col-lg-8">

          
            
         <div class="table-responsive">   
          
                       
          <div class="btn-group">
  <button type="button" class="btn btn-primary">Filtro</button>
  <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
    <span class="caret"></span>
    <span class="sr-only">Toggle Dropdown</span>
  </button>

</div>   
             </br></br>
             
             <table id= "tablamesas" class="table table-bordered" >
              
              
                
                <thead>
                        <tr>
                                
                                <th>Automovil</th>
                                <th>Marca</th>
                                <th>Tipo de Caja</th>
                                <th>Precio</th>
                                <th>Seleccion</th> 
                                <th>Calcomania</th>
                        </tr>
                        
                </thead>
        
                <tbody align="center">
                    
                    
               <?php                                       
                 while ($registro= pg_fetch_row($datos)){
                      
                        $contador=0;
                                foreach ($registro as $clave){

                                 $array[$contador]= $clave;  
                                 $contador ++;                        
                                } 

                 ?>

                    
                             <tr>
                                <td data-title="Automovil"> <?php echo $array[1]; ?>  </td>
                                <td data-title="Marca"><?php echo $array [2]; ?></td>
                                <td data-title="Tipo de Caja" class="numeric"><?php echo $array [3]; ?></td>
                                <td data-title="Precio" class="numeric"> <?php echo $array [4]; ?></td>
                                <td data-title="Selección"> <div class="form-group">
                                    <div class="col-md-10">
                                    <label class="checkbox">
                                    <input type="checkbox" name="check" id="check" value="true" required>
                                    </label>
                                    </div></div>
                                  </td>
                                <td data-title="Calcomanía" class="numeric"> <div align="center"> <?php echo "<a href ='juegos.php? array= $array[0]' class='btn btn-primary'> Mostrar </a>"; ?>  </div> </td>
                                
                        </tr>   
    
                        
                  <?php } ?>        
                        
                        
                </tbody>
                        
 
                        
                </tbody>               
            </table>
             
             
<div id="pageNavTransacciones" style="padding-top: 20px" align="center">
</div>
                                
<script type="text/javascript">
    var pager = new Pager('tablamesas', 3);
    pager.init();
    pager.showPageNav('pager', 'pageNavTransacciones');
    pager.showPage(1);
</script>
                  
        </div>
        </div>
        </div>    
            
      
    
             <div class="row">
                  <div class="col-md-2">
                  </div>                  
                  <div class="col-md-3">
                      <button type="submit" name="registrar" class="btn btn-info" >
                      Registrar
                      </button>
                  </div>
                </div> 
            
          
      </div>

      <hr>

<?php require_once('./modulos/footer.php'); ?> 
      
      
    </div> <!-- /container -->

<?php require_once('./modulos/scriptjs.php'); ?> 
    
    </body>
</html>
